package com.redis;

import com.redis.test03.TestService;
import com.redis.test03.TestZkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * 作者: LCG
 * 日期: 2019/9/10 18:21
 * 描述:
 */

@RestController
public class Test03Controller {


    @Autowired
    private TestService testService;
    @Autowired
    private TestZkService testZkService;

    @RequestMapping("test200")
    public void test(){

        System.out.println("===========锁库存==========");
        Map<String,Object> map=new HashMap<String,Object>();
        map.put("key",1);
        map.put("requestId",1);
        testService.toLockStock(map);

    }


    @RequestMapping("test300")
    public void test300() throws Exception {

        System.out.println("===========锁库存==========");
        testZkService.lockStock();


    }

}
